<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>无标题文档</title>
  <script>
    function keyDown() {
      var value = event.keyCode;
      var key = String.fromCharCode(value);
      alert("纸 " + key + " 纸 " + value);
    }
    document.onkeydown = keyDown;
  </script>
</head>

<body>
</body>

</html>